package com.snail.service;


import com.baomidou.mybatisplus.extension.service.IService;
import com.snail.model.dto.media.FileMergeDto;
import com.snail.model.dto.media.UploadFileResultDto;
import com.snail.model.pojo.media.BizFiles;
import com.snail.model.vo.media.UploadFileVo;
import com.snail.result.Result;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
* @author Monica
* @description 针对表【biz_files(文件主表（图片、文档、视频通用）)】的数据库操作Service
* @createDate 2025-08-12 16:12:54
*/
public interface BizFilesService extends IService<BizFiles> {

    Result<UploadFileResultDto> uploadFile(UploadFileVo uploadFileParams, String absolutePath);

    BizFiles addMediaFilesToDb(String fileMd5, UploadFileVo uploadFileParamsDto, String bucket, String objectName);

    BizFiles getMediaFileByFileMd5(String fileMd5);

    Result<Boolean> deleteFile(String fileMd5);

    Result<Boolean> checkFile(String fileMd5);

    Result<Boolean> checkChunk(String fileMd5, int totalChunks);




    Result uploadChunk(String fileMd5, int chunk, String absolutePath);

    Result mergeChunks(String fileMd5, int chunkTotal, UploadFileVo uploadFileParamsDto);

}
